1. Field of the Invention
The present invention relates to an incremental rotary encoder which is suitable for surveying instruments such as total stations, theodlites or the like.
2. Description of the Related Art
Photoelectric incremental rotary encoders which output more than 10,000 pulses per revolution are widely used as incremental rotary encoders for surveying instruments. Photoelectric incremental rotary encoders are generally provided with two sensors which are positioned so as to be offset from each other by 180 degrees about a rotary scale disc (i.e., which are positioned so as to be opposite from each other with respect to the rotary scale disc). Each of the two sensors is generally provided together with an absolute-zero-index detecting device which outputs a signal (herein after called xe2x80x9czero index signalxe2x80x9d) each time each of the two sensors detects an absolute zero index formed on the rotary scale. The reason why the sensors are arranged so as to be offset from each other by 180 degrees about the rotary scale disc is to compensate for error due to eccentricity of the rotary scale disc. Moreover, the reason why the absolute-zero-index detecting device is necessary for each of the sensors is to avoid influence of the gap between the rotational shaft of the rotary scale disc and the bearing thereof (one cause of eccentricity of the rotary scale disc).
In vertical angle measurement using a photoelectric incremental rotary encoder, it is necessary to compensate for the aforementioned error due to. eccentricity of the rotary scale disc to improve the accuracy of the encoder. In order to compensate for such error, it is effective that the two sensors be arranged to be offset from each other by 180 degrees about the rotary scale disc. However, the zero index signal needs to be output from only one of the two sensors in theory, so that it is costly and space-consuming for the absolute-zero-index detecting device be provided for each of the two sensors.
In the vertical angle measurement, in most cases, the point of detection of the absolute zero index is determined in accordance with the phase difference of the zero index signal with respect to two sine wave signals (a SIN signal and a COS signal) which are all output from a common sensor, and subsequently the points of variation in the signal level of each of the two sine wave signals are counted; usually four variation points are counted per pulse.
If the absolute-zero-index detecting device is provided with only one of the two sensors, the point of commencement of counting pulses which is determined after the detecting device detects the absolute zero index is substantially the same at all times at the sensor having the absolute-zero-index detecting device on one side of the rotary scale disk, whereas the absolute zero index might vary within a range of xc2x1 a few counts at the sensor on the other side of the rotary scale disk which does not have an absolute-zero-index detecting device. This causes the value of the pulse counter to include an error (absolute-zero-index detection error) each time the absolute zero index is detected.
In the incremental rotary encoders which output less pulses than the photoelectric incremental rotary encoders per revolution (about a few thousand pulses per revolution) such as magnetic incremental rotary encoders, the gap between the rotational shaft of the rotary scale disc and the bearing thereof is small relative to the pitch of the divisions of the rotary drum (e.g., magnetic drum), so that absolute-zero-index detection error hardly occurs. However, there still remains a possibility of a pulse counting error within a range of xc2x1 one count occurring.
An object of the present invention is to provide an incremental rotary encoder which outputs a relatively small number of pulses per revolution such as a magnetic incremental rotary encoder in which the absolute-zero-index detection error does not occur even if the absolute-zero-index detecting device is provided for only one of the two sensors, which are offset from each other by 180 degrees about the rotary disc or drum.
In order to achieve the above object, an incremental rotary encoder is provided having a first sensor and a second sensor, each of the first and second sensors outputting two sine wave signals having a phase difference of 90 degrees while a rotary member of the incremental rotary encoder rotates, the first and second sensors being positioned so as to be offset from each other by 180 degrees about the rotary member. The incremental rotary encoder includes an absolute-zero-index detecting device, provided for the first sensor, which outputs a zero index signal each time the first sensor detects an absolute zero index formed on the rotary member; at least one binary coding circuit which codes each of the two sine wave signals and the zero index signal into a corresponding binary signal; a holding device for holding the level data of the binary signal of each of the two sine wave signals output from the second sensor, at the moment the absolute-zero-index detecting device outputs the zero index signal; and a controller for determining whether the phase of the two sine wave signals output from the second sensor advances or delays with respect to the phase of the two sine wave signals output from the first sensor.
According to another aspect of the present invention, a surveying instrument is provided including a leveling board, a pedestal coupled to the leveling board to be rotatable about a vertical axis relative to the leveling board; a collimating telescope coupled to the pedestal to be rotatable about a horizontal axis relative to the pedestal; a horizontal-angle measuring device for measuring an angle of rotation of the pedestal relative to the leveling board; and a vertical-angle measuring device for measuring an angle of rotation of the collimating telescope relative to the pedestal. At least one of the horizontal-angle measuring device and the vertical-angle measuring device includes an incremental rotary encoder having a first sensor and a second sensor, each of the first and second sensors outputting two sine wave signals having a phase difference of 90 degrees while a rotary member of the incremental rotary encoder rotates, the first and second sensors being positioned so as to be offset from each other by 180 degrees about the rotary member, the incremental rotary encoder including an absolute-zero-index detecting device, provided for the first sensor, which outputs a zero index signal each time the first sensor detects an absolute zero index formed on the rotary member; at least one binary coding circuit which codes each of the two sine wave signals and the zero index signal into a corresponding binary signal; a holding device for holding the level data of the binary signal of each of the two sine wave signals output from the second sensor, at the moment the absolute-zero-index detecting device outputs the zero index signal; and a controller for determining whether the phase of the two sine wave signals output from the second sensor advances or delays with respect to the phase of the two sine wave signals output from the first sensor.
In the above aspects in the present invention, preferably, the incremental rotary encoder further includes a counter which increases or decreases a counter value thereof each time a point of variation occurs in each of the two sine wave signals output from each of the first and second sensors. The controller calculates an angle of rotation of the rotary member in accordance with the counter value of the counter which starts counting from a point of detection of the absolute zero index by the absolute-zero-index detecting device. The controller compensates for the counter value generated from the second sensor in accordance with a determination of advancing or delaying by the controller to determine the angle of rotation.
Preferably, the controller device determines whether the phase of the two sine wave signals output from the second sensor advances or delays with respect to the phase of the two sine wave-signals output from the first sensor at xc2xc pitch. 
Preferably, the rotary member includes a magnetic drum which is provided on an outer peripheral surface thereof with a multi-pole magnetized layer having a plurality of magnetized divisions equally divided, a pitch xcex of the plurality of magnetized divisions being predetermined, the magnetic drum being rotatably supported by a stationary portion. Each of the first sensor and the second sensor includes a magnetic sensor fixed relative to the stationary member to face the multi-pole magnetized layer. Each of the first sensor and the second sensor includes a plurality of magnetoresistor elements which are located at xcex/4 intervals. The plurality of magnetoresistor elements are divided into two groups, magnetoresistor elements of each group of the two groups of magnetoresistor elements being arranged at xcex/2 intervals.
Preferably, the incremental rotary encoder further includes at least one differential amplifier which amplifies the difference between outputs of each two groups of magnetoresistor elements to output a sine wave signal.
Preferably, the magnetic drum includes a magnetized portion which defines the absolute zero index, the magnetized portion being positioned on, an outer peripheral surface of the magnetic drum at a position separate from the multi-pole magnetized layer in a direction of a rotational axis of the magnetic drum. The magnetic sensor of the first sensor includes at least one magnetoresistor element which is positioned so as to be able to face the magnetized portion to output the zero index signal each time the magnetized portion passes by the at least one magnetoresistor element.
Preferably, the absolute-zero-index detecting device includes an absolute-zero-index detecting circuit which outputs an absolute-zero-index detection pulse at the moment the level of one of the two sine wave signals output from the first sensor varies while the zero index signal is being generated. Two binary signals of two level data are output from the second sensor while the absolute-zero-index detection pulse is output.
Preferably, the incremental rotary encoder further includes a memory in which a compensation value, which corresponds with a determination of advancing or delaying by said controller, is stored. The controller detects a combination of the two level data of the two binary signals at the moment the absolute-zero-index detecting circuit outputs the absolute-zero-index detection pulse, subsequently determines whether the phase of the two sine wave signals output from the second sensor advances or delays with respect to the phase of the two sine wave signals output from the first sensor at xc2xc pitch, and thereafter stores a compensation value on advancing or delaying determined by the controller in the memory. The compensation value, which is stored in the memory, is added to the counter value to compensate for the counter value. 
Preferably, the median voltage of the sine wave signal is approximately zero.
Preferably, the incremental rotary encoder is a magnetic incremental rotary encoder.
The present disclosure relates to subject matter contained in Japanese Patent Application No.11-123077 (filed on Apr. 28, 1999) which is expressly incorporated herein by reference in its entirety.